package com.ylx.demo.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.config.TopicBuilder;

@Configuration
public class MyKafkaConfiguration {
    @Bean
    public NewTopic userTopic() {
        return TopicBuilder.name("userTopic").build();
        //return new NewTopic("userTopic",1,(short)0);
    }
}
